﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package GameMode {
    import flash.events.*;
    import Classes.*;

    public class GMEditMove extends GMEdit {

        public function GMEditMove(){
            m_showMousePointer = true;
            m_cursorImage = EmbeddedArt.hud_act_move;
        }
        override public function enableMode():void{
            super.enableMode();
        }
        override protected function isObjectSelectable(_arg1:GameObject):Boolean{
            return (_arg1.canBeDragged());
        }
        override public function onMouseUp(_arg1:MouseEvent):Boolean{
            var _local2:MapResource = (m_selectedObject as MapResource);
            if (((_local2) && (!(m_dragging)))){
                if (_local2.isMoveLocked){
                    _local2.unlockMovement();
                } else {
                    _local2.setActive(false);
                    Global.world.addGameMode(new GMEditMove());
                    if ((_local2 is DockHouse)){
                        Global.world.addGameMode(new GMLinkedObjectMove(_local2), false);
                    } else {
                        Global.world.addGameMode(new GMObjectMove(_local2), false);
                    };
                };
            };
            return (super.onMouseUp(_arg1));
        }

    }
}//package GameMode 
